package com.gitee.minimalismstyle.fresh.simple.sql.impl

import com.gitee.minimalismstyle.fresh.simple.api.model.SimpleFormField
import com.gitee.minimalismstyle.fresh.simple.sql.Condition
import org.springframework.stereotype.Component

@Component
class EndLikeCondition: Condition {
    override fun add(sql: StringBuffer, simpleFormField: SimpleFormField) {
        sql.append("""
            --@if(!isBlank(${simpleFormField.code})){
            and ${simpleFormField.column} like #{${simpleFormField.code}+'%'}
            --@}
        """)
    }
}